home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part2 / 15775 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  783 b 

  1. Path: nntp.teleport.com!usenet
  2. From: GHouck <hksys@teleport.com>
  3. Newsgroups: comp.lang.c++
  4. Subject: Re: Small question
  5. Date: 8 Apr 1996 04:45:40 GMT
  6. Organization: systems hk
  7. Message-ID: <4ka5lk$dln@nadine.teleport.com>
  8. References: <31674eeb.132847918@vixa.voyager.net>
  9. NNTP-Posting-Host: ip-pdx21-13.teleport.com
  10. Mime-Version: 1.0
  11. Content-Type: text/plain; charset=us-ascii
  12. Content-Transfer-Encoding: 7bit
  13. X-Mailer: Mozilla 1.22 (Windows; I; 32bit)
  14.  
  15. sence@ava.taby.se (Bjorn Osterman) wrote:
  16. >If I have 2 cpp files and i use the same global variable that i define
  17. >in some file that both cpp-files includes. How do I tell the compiler
  18. >that the variable is the same and that it shouldn't make space 2
  19. >times?
  20.  
  21. Try declaring it as 'extern' in the including files.
  22. Yours, Geoff Houck
  23.  
  24.